import request from '@/utils/request'

// 查询排班列表
export function listScheduling(query) {
  return request({
    url: '/system/scheduling/list',
    method: 'get',
    params: query
  })
}

// 查询排班详细
export function getScheduling(id) {
  return request({
    url: '/system/scheduling/' + id,
    method: 'get'
  })
}

// 新增排班
export function addScheduling(data) {
  return request({
    url: '/system/scheduling',
    method: 'post',
    data: data
  })
}

// 修改排班
export function updateScheduling(data) {
  return request({
    url: '/system/scheduling',
    method: 'put',
    data: data
  })
}

// 删除排班
export function delScheduling(id) {
  return request({
    url: '/system/scheduling/' + id,
    method: 'delete'
  })
}

// 查询全部医生
export function findDockers() {
  return request({
    url: '/system/docker/selectAll',
    method: 'get'
  })
}

// 查询全部类型
export function findTypes() {
  return request({
    url: '/system/type/selectAll',
    method: 'get'
  })
}

// 查询医生详细
export function findDockerById(id) {
  return request({
    url: '/system/docker/' + id,
    method: 'get'
  })
}

// 根据医生id和日期查询排班表
export function findSc(dId,date) {
  return request({
    url: '/system/scheduling/findSc/' + dId+"?date="+date,
    method: 'get'
  })
}

